import serve from './../Base/Http.js'
import qs from 'qs'
   // 数据列表
   export default {
    recommend(allPages){
        return serve({
            method:'get',
            params:{
                _gp:"admin.recommend",
                _mt:"queryRecommendByType",    
                 //分页
                recommendType: allPages.value,
                pageNo: allPages.currentPage,
                limit: allPages.eachpage
              }
        })
    },
    // 添加
    addition(data){
      console.log(data)
      return serve({
          method:'post',
          data:qs.stringify({
              _gp: "admin.recommend",
              _mt: "addRecommend",
              ...data
            })
      }) 
  },
  //删除
  handleDeletec (data){
    return serve({
        method:'post',
        data:qs.stringify(
          {
            _gp: "admin.recommend",
            _mt: "deleteRecommend",
            ...data
          }
        )
    })
},
// sup树
spuTitles(){
    return serve({
        method:'get',
        params:{
            _gp:"admin.goods",
            _mt:"getSpuBigTree",
          }
    }) 
},
}